<template>
	<view class="content">
		<view class="desc">
			<view class="t">反馈信息</view>
			<u--textarea v-model="info" border="none" placeholder="请输入内容"></u--textarea>
		
		</view>
		<view class="line">
			<view class="l">姓名：</view>
			<input type="text" class="r" v-model="name" placeholder="请输入姓名" />
		</view>
		<view class="line">
			<view class="l">手机号：</view>
			<input type="number" class="r" v-model="mobile" placeholder="请输入联系手机号" />
		</view>
		<view class="btn" @click="save">提交</view>
		<view class="list" @click="authTo('pages/my/feedback/feedbackList')">反馈列表</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				barHeight: '',
				info: '',
				fileList1: [],
				mobile: '',
				name: ''
			};
		},
		onLoad() {
			this.barHeight = uni.getSystemInfoSync().statusBarHeight
		},
		methods: {
			save() {
				
				uni.$u.http.post('/feedback',{
					type: 'send',
					content: this.info,
					name: this.name,
					mobile: this.mobile
				}).then((res) => {
					if (res.code === 1) {
						uni.$u.toast('已收到您的反馈')
						
					}
				}).catch(() => {
				
				})
			},
			
			
			back() {
				uni.$u.route({
					type: 'back'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	
	.content {
		background: #f6f6f6;
		padding-top: 20rpx;
		height: 100vh;
		box-sizing: border-box;
	}

	.main {
		flex: 1;
		overflow-y: scroll;
	}

	.btn {
		width: 470rpx;
		height: 92rpx;
		margin: 40rpx auto 0;
		background: linear-gradient(to right, #FFDF41, #FFC141);
		font-size: 38rpx;
		border-radius: 46rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.line{
		height: 100rpx;
		display: flex;
		align-items: center;
		border-bottom: 1px solid #F6F6F6;
		background: #fff;
		margin: 0 35rpx;
		
		.l{
			color: #575859;
			font-size: 32rpx;
			width: 180rpx;
			text-align: right;
		}
		.r{
			flex: 1;
		}
	}
	.list{
		text-align: center;
		color: #7F7F7F;
		margin-top: 50rpx;
	}
	.desc {
		margin: 0 35rpx 20rpx;
		padding: 20rpx 40rpx;
		border: 2px solid #fff;
		border-radius: 10rpx;
		background: #fff;

		.t {
			color: #7F7F7F;
			font-size: 30rpx;
			margin-bottom: 10rpx;
		}
	}


</style>
